package com.lixianhe.onlineexam.controller;


import com.lixianhe.onlineexam.pojo.Admin;
import com.lixianhe.onlineexam.service.impl.AdminServiceImpl;
import com.lixianhe.onlineexam.util.ApiResultHandler;
import com.lixianhe.onlineexam.util.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class AdminController {
    @Autowired
    private AdminServiceImpl adminService;
    @PutMapping("/adminPWD")
    public R updatePwd(@RequestBody Admin admin) {
        adminService.updatePwd(admin);
        return ApiResultHandler.buildApiResult(200, "密码更新成功", null);
    }
}
